package com.halflife.comeElectricity.batteryCabinet;

import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public interface BatteryCabinetRepository {

    int deleteByPrimaryKey(Integer id);

    int insert(BatteryCabinet batteryCabinet);

    int insertSelective(BatteryCabinet batteryCabinet);

    BatteryCabinet selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(BatteryCabinet batteryCabinet);

    int updateByPrimaryKey(BatteryCabinet batteryCabinet);

    List<BatteryCabinet> selectAll(Map<String, Object> param);

    int selectCount(Map<String, Object> param);

    List<BatteryCabinet> selectListByPage(Map<String, Object> param);

    @Select({"${sql}"})
    @ResultMap("BaseResultMap")
    List<BatteryCabinet> selectMany(@Param("sql") String sql);

    @Select({"${sql}"})
    @ResultMap("BaseResultMap")
    BatteryCabinet selectOne(@Param("sql") String sql);



}